package com.zf.bm.common.validator;

import com.alibaba.fastjson.JSONObject;
import com.zf.bm.common.utils.StringUtil;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class ValidateFacilityTypeParam implements ConstraintValidator<ValidateFacilityType, Object> {
    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        String s = JSONObject.toJSONString(value);
        if(StringUtil.isNotBlank(s) && !s.contains("null")){
            return true;
        }
        return false;
    }
}
